package org.amphiprion.rfreplayanalyser.parser;

public class Driver {
	private String name;
	private String coName;
	private long driverId;
	public DriverLocation tmpLastLoc;
	public float tmpCarY = Float.MAX_VALUE;
	public float tmpCarX = Float.MAX_VALUE;
	public int tmpStartLocIndex;
	public boolean tmpNotRunning;
	public float tmpTouchTime;
	public float tmpStopAt;
	public long tmpLastTouchedDriver;
	public float tmpLastTouchedTime;
	public float tmpAngZ;
	public float tmpCarZ;
	public boolean offRoad;

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the coName
	 */
	public String getCoName() {
		return coName;
	}

	/**
	 * @param coName
	 *            the coName to set
	 */
	public void setCoName(String coName) {
		this.coName = coName;
	}

	/**
	 * @return the driverId
	 */
	public long getDriverId() {
		return driverId;
	}

	/**
	 * @param driverId
	 *            the driverId to set
	 */
	public void setDriverId(long driverId) {
		this.driverId = driverId;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (driverId ^ driverId >>> 32);
		return result;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		Driver other = (Driver) obj;
		if (driverId != other.driverId) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return name;
	}

}
